package com.library.service.impl;

import com.library.bean.User;
import com.library.mapper.UserMapper;
import com.library.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User LoginUser(User user) {
        if (userMapper.selectUserByName(user.getUserName()) != null){
            return userMapper.LoginUser(user);
        }
        return null;
    }
}
